// 定义注册相关的接口
import instance from '@/http/request'

// 验证手机号码是否被注册过
export function docheckphone(data: { tel: string }) {
    return instance({
        url: `/user/docheckphone`,
        method: 'post',
        data
    })
}

// 发送手机短信验证码
// /user/dosendmsgcode
export function dosendmsgcode(data: { tel: string }) {
    return instance({
        url: `/user/dosendmsgcode`,
        method: 'post',
        data
    })
}

// 验证验证码是否正确接口
export function docheckcode(data: { tel: string, telcode: string }) {
    return instance({
        url: `/user/docheckcode`,
        method: 'post',
        data
    })
}

//注册接口
export function dofinishregister(data: { tel: string, password: string }) {
    return instance({
        url: `/user/dofinishregister`,
        method: 'post',
        data
    })
}
